<!DOCTYPE html>
<html lang="en" itemscope itemtype="https://schema.org/WebPage">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Vitess / Release Instructions</title>

        <!-- Webfont -->
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
    
    <!--<link rel="shortcut icon" type="image/png" href="/favicon.png">-->

    <!-- Bootstrap -->
    <link href="/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- Styles -->
    <link rel="stylesheet" type="text/css" href="/css/site.css" />
    <!-- Font Awesome icons -->
    <link href="/libs/font-awesome-4.4.0/css/font-awesome.min.css"
          rel="stylesheet"
          type="text/css">
    
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/libs/bootstrap/js/bootstrap.min.js"></script>


    <!-- metadata -->
    <meta name="og:title" content="Vitess / Release Instructions"/>
    <meta name="og:image" content="/images/vitess_logo_with_border.svg"/>
    <meta name="og:description" content="Vitess is a database clustering system for horizontal scaling of MySQL."/>

    <link rel="icon" href="/images/vitess_logo_icon_size.png" type="image/png">

    
    <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-60219601-1', 'auto');
  ga('send', 'pageview');
</script>

    
  </head>
  <body class="docs" id="top_of_page">

    <span id="toc-depth" data-toc-depth="h2,h3"></span>


    <nav id="common-nav" class="navbar navbar-fixed-top inverse">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">
        <img class="logo" src="/images/vitess_logo_with_border.svg" alt="Vitess">
      </a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right" id="standard-menu-links">
        <li><a href="/overview/">Overview</a></li>
        <li><a href="/user-guide/introduction.html">Guides</a></li>
        <li><a href="/reference/vitess-api.html">Reference</a></li>
        <li><a href="http://blog.vitess.io">Blog</a></li>
        <li><a href="https://github.com/youtube/vitess"><i class="fa fa-github"></i> GitHub</a></li>
        <!-- Hide link to blog unless we have actual posts -->
        <!-- <li><a href="/blog/" title="">Blog</a></li> -->
      </ul>
      <ul class="nav nav-stacked mobile-left-nav-menu" id="collapsed-left-menu">
                <li class="submenu">
          <h4 class="arrow-r no-top-margin">Overview</h4>
          <ul style="display: none">
            <li><a href="/overview/">What is Vitess</a></li>
            <li><a href="/overview/scaling-mysql.html">Scaling MySQL with Vitess</a></li>
            <li><a href="/overview/concepts.html">Key Concepts</a></li>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Getting Started</h4>
          <ul style="display: none">
            <li style="padding-bottom: 0"><a href="/getting-started/">Run Vitess on Kubernetes</a>
              <ul style="display: block">
                <li style="padding-bottom: 0"><a href="/getting-started/docker-build.html">Custom Docker Build</a></li>
              </ul>
            </li>
            <li><a href="/getting-started/local-instance.html">Run Vitess Locally</a></li>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">User Guide</h4>
          <ul style="display: none">
            <li><a href="/user-guide/introduction.html">Introduction</a>
            <li><a href="/user-guide/client-libraries.html">Client Libraries</a>
            <li><a href="/user-guide/backup-and-restore.html">Backing Up Data</a>
            <li><a href="/user-guide/reparenting.html">Reparenting</a></li>
            <li style="padding-bottom: 0"><a href="/user-guide/schema-management.html">Schema Management</a></li>
              <ul style="display: block">
                <li style="padding-bottom: 0"><a href="/user-guide/vschema.html">VSchema Guide</a></li>
                <li style="padding-bottom: 0"><a href="/user-guide/schema-swap.html">Schema Swap (Tutorial)</a></li>
              </ul>
            <li style="padding-bottom: 0"><a href="/user-guide/sharding.html">Sharding</a>
              <ul style="display: block">
                <li><a href="/user-guide/horizontal-sharding-workflow.html">Horizontal Sharding (Tutorial, automated)</a></li>
                <li><a href="/user-guide/horizontal-sharding.html">Horizontal Sharding (Tutorial, manual)</a></li>
                <li><a href="/user-guide/sharding-kubernetes-workflow.html">Sharding in Kubernetes (Tutorial, automated)</a></li>
                <li style="padding-bottom: 0"><a href="/user-guide/sharding-kubernetes.html">Sharding in Kubernetes (Tutorial, manual)</a></li>
              </ul>
            </li>
            <li><a href="/user-guide/vitess-sequences.html">Vitess Sequences</a></li>
            <li><a href="/user-guide/mysql-server-protocol.html">MySQL Server Protocol</a></li>
            <li><a href="/user-guide/vitess-replication.html">Vitess and Replication</a></li>
            <li><a href="/user-guide/update-stream.html">Update Stream</a></li>
            <li><a href="/user-guide/row-based-replication.html">Row Based Replication</a></li>
            <li><a href="/user-guide/topology-service.html">Topology Service</a></li>
            <li><a href="/user-guide/transport-security-model.html">Transport Security Model</a></li>
            <li style="padding-bottom: 0"><a href="/user-guide/launching.html">Launching</a>
              <ul style="display: block">
                <li><a href="/user-guide/scalability-philosophy.html">Scalability Philosophy</a></li>
                <li><a href="/user-guide/production-planning.html">Production Planning</a></li>
                <li><a href="/user-guide/server-configuration.html">Server Configuration</a></li>
                <li><a href="/user-guide/twopc.html">2PC Guide</a></li>
                <li style="padding-bottom: 0"><a href="/user-guide/troubleshooting.html">Troubleshooting</a></li>
              </ul>
            </li>
            <li><a href="/user-guide/upgrading.html">Upgrading</a></li>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Reference Guides</h4>
          <ul style="display: none">
            <li><a href="/reference/vitess-api.html">Vitess API</a>
            <li><a href="/reference/vtctl.html">vtctl Commands</a>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Other Resources</h4>
          <ul style="display: none">
            <li><a href="/resources/presentations.html">Presentations</a>
            <li><a href="http://blog.vitess.io/">Blog</a>
            <li><a href="/resources/roadmap.html">Roadmap</a>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Contributing</h4>
          <ul style="display: none">
            <li><a href="/contributing/">Contributing to Vitess</a>
            <li><a href="/contributing/github-workflow.html">GitHub Workflow</a>
            <li><a href="/contributing/code-reviews.html">Code Reviews</a>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Internal</h4>
          <ul style="display: none">
            <li><a href="/internal/">Overview</a>
            <li><a href="/internal/release-instructions.html">Release Instructions</a>
            <li><a href="/internal/publish-website.html">Publish Website</a>
          </ul>
        </li>

        <div>
          <form method="get" action="/search/">
            <input id="search-form" name="q" type="text" placeholder="Search">
          </form>
        </div>

        <li><a href="https://github.com/youtube/vitess" id="collapsed-left-menu-repo-link"><i class="fa fa-github"></i> GitHub</a></li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

    
<div id="masthead">
  <div class="container">
    <div class="row">
      <div class="col-md-9">
        <h1>Release Instructions</h1>
      </div>
    </div>
  </div>
</div>


<div class="container">
    <div class="row scroll-margin" id="toc-content-row">
    <div class="col-md-2" id="leftCol">
      <ul class="nav nav-stacked mobile-left-nav-menu" id="sidebar">
                <li class="submenu">
          <h4 class="arrow-r no-top-margin">Overview</h4>
          <ul style="display: none">
            <li><a href="/overview/">What is Vitess</a></li>
            <li><a href="/overview/scaling-mysql.html">Scaling MySQL with Vitess</a></li>
            <li><a href="/overview/concepts.html">Key Concepts</a></li>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Getting Started</h4>
          <ul style="display: none">
            <li style="padding-bottom: 0"><a href="/getting-started/">Run Vitess on Kubernetes</a>
              <ul style="display: block">
                <li style="padding-bottom: 0"><a href="/getting-started/docker-build.html">Custom Docker Build</a></li>
              </ul>
            </li>
            <li><a href="/getting-started/local-instance.html">Run Vitess Locally</a></li>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">User Guide</h4>
          <ul style="display: none">
            <li><a href="/user-guide/introduction.html">Introduction</a>
            <li><a href="/user-guide/client-libraries.html">Client Libraries</a>
            <li><a href="/user-guide/backup-and-restore.html">Backing Up Data</a>
            <li><a href="/user-guide/reparenting.html">Reparenting</a></li>
            <li style="padding-bottom: 0"><a href="/user-guide/schema-management.html">Schema Management</a></li>
              <ul style="display: block">
                <li style="padding-bottom: 0"><a href="/user-guide/vschema.html">VSchema Guide</a></li>
                <li style="padding-bottom: 0"><a href="/user-guide/schema-swap.html">Schema Swap (Tutorial)</a></li>
              </ul>
            <li style="padding-bottom: 0"><a href="/user-guide/sharding.html">Sharding</a>
              <ul style="display: block">
                <li><a href="/user-guide/horizontal-sharding-workflow.html">Horizontal Sharding (Tutorial, automated)</a></li>
                <li><a href="/user-guide/horizontal-sharding.html">Horizontal Sharding (Tutorial, manual)</a></li>
                <li><a href="/user-guide/sharding-kubernetes-workflow.html">Sharding in Kubernetes (Tutorial, automated)</a></li>
                <li style="padding-bottom: 0"><a href="/user-guide/sharding-kubernetes.html">Sharding in Kubernetes (Tutorial, manual)</a></li>
              </ul>
            </li>
            <li><a href="/user-guide/vitess-sequences.html">Vitess Sequences</a></li>
            <li><a href="/user-guide/mysql-server-protocol.html">MySQL Server Protocol</a></li>
            <li><a href="/user-guide/vitess-replication.html">Vitess and Replication</a></li>
            <li><a href="/user-guide/update-stream.html">Update Stream</a></li>
            <li><a href="/user-guide/row-based-replication.html">Row Based Replication</a></li>
            <li><a href="/user-guide/topology-service.html">Topology Service</a></li>
            <li><a href="/user-guide/transport-security-model.html">Transport Security Model</a></li>
            <li style="padding-bottom: 0"><a href="/user-guide/launching.html">Launching</a>
              <ul style="display: block">
                <li><a href="/user-guide/scalability-philosophy.html">Scalability Philosophy</a></li>
                <li><a href="/user-guide/production-planning.html">Production Planning</a></li>
                <li><a href="/user-guide/server-configuration.html">Server Configuration</a></li>
                <li><a href="/user-guide/twopc.html">2PC Guide</a></li>
                <li style="padding-bottom: 0"><a href="/user-guide/troubleshooting.html">Troubleshooting</a></li>
              </ul>
            </li>
            <li><a href="/user-guide/upgrading.html">Upgrading</a></li>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Reference Guides</h4>
          <ul style="display: none">
            <li><a href="/reference/vitess-api.html">Vitess API</a>
            <li><a href="/reference/vtctl.html">vtctl Commands</a>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Other Resources</h4>
          <ul style="display: none">
            <li><a href="/resources/presentations.html">Presentations</a>
            <li><a href="http://blog.vitess.io/">Blog</a>
            <li><a href="/resources/roadmap.html">Roadmap</a>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Contributing</h4>
          <ul style="display: none">
            <li><a href="/contributing/">Contributing to Vitess</a>
            <li><a href="/contributing/github-workflow.html">GitHub Workflow</a>
            <li><a href="/contributing/code-reviews.html">Code Reviews</a>
          </ul>
        </li>
        <li class="submenu">
          <h4 class="arrow-r">Internal</h4>
          <ul style="display: none">
            <li><a href="/internal/">Overview</a>
            <li><a href="/internal/release-instructions.html">Release Instructions</a>
            <li><a href="/internal/publish-website.html">Publish Website</a>
          </ul>
        </li>

        <div>
          <form method="get" action="/search/">
            <input id="search-form" name="q" type="text" placeholder="Search">
          </form>
        </div>

      </ul>
    </div>
    <div class="col-md-3" id="rightCol">
      <div class="nav nav-stacked" id="tocSidebar">
        <div id="toc"></div>
      </div>
    </div>
    <div class="col-md-7" id="centerCol">
      <div id="centerTextCol">
        <h1 id="release-instructions">Release Instructions</h1>

<p>This page describes the steps for cutting a new <a href="https://github.com/youtube/vitess/releases">open source release</a>.</p>

<h2 id="versioning">Versioning</h2>

<p>Our versioning strategy is based on <a href="http://semver.org/">Semantic Versioning</a>.</p>

<h3 id="major-release-vx">Major Release (vX)</h3>

<p>A new major release is needed when the public API changes in a
backward-incompatible way -- for example, when removing deprecated interfaces.</p>

<p>Our public API includes (but is not limited to):</p>

<ul>
<li>  The VTGate <a href="https://github.com/youtube/vitess/tree/master/proto">RPC interfaces</a>.</li>
<li>  The interfaces exposed by the VTGate client library in each language.</li>
</ul>

<p>Care must also be taken when changing the format of any data stored by a live
system, such as topology data or Vitess-internal tables (used for sequences,
distributed transactions, etc.). Although this data is considered internal to
Vitess, if any change breaks the upgrade path for a live system (for example,
requiring that it be shut down and reinitialized from scratch), then it must be
considered a breaking change.</p>

<h3 id="minor-release-vx-y">Minor Release (vX.Y)</h3>

<p>A new minor release indicates that functionality has been added or changed in a
backward-compatible way. This should be the majority of normal releases.</p>

<h3 id="patch-release-vx-y-z">Patch Release (vX.Y.Z)</h3>

<p>A patch release indicates that only a select set of bugfixes have been
cherrypicked onto the associated minor release. The expectation is that
upgrading by a patch release should be painless (not requiring any config
changes) and safe (isolated from active development on <code class="prettyprint">master</code>).</p>

<h3 id="pre-release-labels-vx-y-z-label-n">Pre-Release Labels (vX.Y.Z-label.N)</h3>

<p>Pre-release versions should be labeled with a suffix like <code class="prettyprint">-beta.2</code> or <code class="prettyprint">-rc.1</code>.
The dot before the number is important for correct determination of version
precedence.</p>

<h2 id="milestones">Milestones</h2>

<p><a href="https://github.com/youtube/vitess/milestones">GitHub Milestones</a> are hotlists
for Issues and Pull Requests.</p>

<p>When it&#39;s time to start planning a new Vitess release, create a milestone for it
and tag the following items under it:</p>

<ul>
<li>  Issues that are release-blockers for that milestone.</li>
<li>  For major/minor releases:

<ul>
<li>  Pull Requests that must be merged before cutting that milestone. This
makes it clear what we&#39;re waiting for.</li>
</ul></li>
<li>  For patch releases:

<ul>
<li>  Pull Requests that should be cherrypicked into the release branch for
that milestone. Any other PRs will be ignored and must wait for the next
minor release.</li>
</ul></li>
</ul>

<h2 id="release-branches">Release Branches</h2>

<p>Each minor release level (X.Y) should have a <a href="https://github.com/youtube/vitess/branches/all?query=release">release branch</a> named
<code class="prettyprint">release-X.Y</code>. This branch should diverge from <code class="prettyprint">master</code> when the code freeze for
that release is declared, after which point only bugfix PRs should be
cherrypicked onto the branch. All other activity on <code class="prettyprint">master</code> will go out with a
subsequent minor release.</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash">git checkout master
git pull --ff-only upstream master

git checkout -b release-X.Y
git push upstream release-X.Y
</code></pre></div>
<p>The branches are named <code class="prettyprint">release-X.Y</code> to distinguish them from point-in-time
tags, which are named <code class="prettyprint">vX.Y.Z</code>.</p>

<h2 id="release-tags">Release Tags</h2>

<p>While the release branch is a moving target, release tags mark point-in-time
snapshots of the repository. Essentially, a tag assigns a human-readable name to
a specific Git commit hash. Although it&#39;s technically possible to reassign a tag
name to a different hash, we must never do this.</p>

<p>Since a tag represents a particular point in time, only patch releases (X.Y.Z)
have tags. These should be defined as <a href="https://git-scm.com/book/en/v2/Git-Basics-Tagging#Annotated-Tags">annotated tags</a> from the
associated release branch, after all cherrypicks have been applied and tested.</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash">git checkout release-X.Y
git pull --ff-only upstream release-X.Y

git cherry-pick &lt;commit&gt; ...

git tag -a vX.Y.Z
</code></pre></div>
<p>Note that this only creates the tag in your local Git repository. Pushing the
tag up to GitHub will be the last step, because it is the point of no return.
That&#39;s because if someone has already fetched the tag, they will not get updated
if you change the tag. Therefore, if you need to tag a different commit after
pushing to upstream, you must increment the version number and create a new tag
(i.e. a new release).</p>

<h2 id="docker-images">Docker Images</h2>

<p>Note: You&#39;ll require an account on Docker Hub to execute the <code class="prettyprint">docker push</code>
command.</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c"># Rebuild all dependent images locally. Full chain: common-&gt;mysql57-&gt;base-&gt;lite.</span>
make docker_bootstrap <span class="nv">DOCKER_IMAGES</span><span class="o">=</span><span class="s2">&quot;common mysql57&quot;</span>
make docker_base

make docker_lite
make docker_guestbook

<span class="nv">MINOR</span><span class="o">=</span>vX.Y
<span class="nv">PATCH</span><span class="o">=</span>vX.Y.Z

<span class="c"># Tag the new PATCH version.</span>
docker tag vitess/lite vitess/lite:<span class="nv">$PATCH</span>
docker tag vitess/guestbook vitess/guestbook:<span class="nv">$PATCH</span>

<span class="c"># NOTE: Skip these two steps for pre-releases (e.g. alpha.1, rc.1 releases).</span>
<span class="c"># Update the MINOR Docker tag to point to the latest PATCH version.</span>
docker tag -f vitess/lite vitess/lite:<span class="nv">$MINOR</span>
docker tag -f vitess/guestbook vitess/guestbook:<span class="nv">$MINOR</span>

<span class="c"># Push the tags and images to Docker Hub.</span>
docker push vitess/lite:<span class="nv">$PATCH</span>
docker push vitess/lite:latest
docker push vitess/guestbook:<span class="nv">$PATCH</span>
docker push vitess/guestbook:latest
<span class="c"># NOTE: Skip the next two steps for pre-releases (e.g. alpha.1, rc.1 releases).</span>
docker push vitess/lite:<span class="nv">$MINOR</span>
docker push vitess/guestbook:<span class="nv">$MINOR</span>
</code></pre></div>
<p>Note that you <strong>do not</strong> push the <code class="prettyprint">base</code> image you built. That gets built
automatically by Docker Hub when you push the branch.</p>

<p>After pushing the Docker images, you have to make sure that our tutorials still
work with them.</p>

<h2 id="testing">Testing</h2>

<h3 id="local-tutorial">Local Tutorial</h3>

<p>We must check that the <a href="http://vitess.io/getting-started/local-instance.html#start-a-vitess-cluster">local startup
tutorial</a>
is not broken.</p>

<p>Instead of going through the steps manually, run the <code class="prettyprint">local_example</code> test which
should have the same commands as the tutorial. You can use our <code class="prettyprint">test.go</code> test
runner to run the test for all MySQL flavors. <code class="prettyprint">-parallel=2</code> will run two tests
in parallel to shorten the test duration.</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash">./test.go -flavor<span class="o">=</span>all -pull<span class="o">=</span><span class="nb">false</span> -parallel<span class="o">=</span><span class="m">2</span> local_example
</code></pre></div>
<h3 id="kubernetes-tutorial">Kubernetes Tutorial</h3>

<p>Follow the <a href="http://vitess.io/getting-started/">Kubernetes tutorial</a>, which will
automatically use the latest Docker images you pushed.</p>

<p>TODO(mberlin): Describe how to launch our new cluster tests in <code class="prettyprint">test/cluster</code>
instead.</p>

<h2 id="java-packages">Java Packages</h2>

<p>We publish binary packages for our <a href="https://search.maven.org/#search%7Cga%7C1%7Cg:%22io.vitess%22">JDBC driver and Java client on Maven Central</a>.</p>

<p>To do so, we use the <a href="http://oss.sonatype.org/">http://oss.sonatype.org/</a> repository.
New packages must be uploaded there (&quot;deployed&quot;) and will be automatically published (&quot;released&quot;).
Once they are released there, they will be automatically synchronized with Maven Central.
The synchronization takes only several minutes but the update on <a href="http://search.maven.org">http://search.maven.org</a> may take up to two hours.</p>

<h3 id="access-to-oss-sonatype-org">Access to oss.sonatype.org</h3>

<p><a href="https://issues.sonatype.org/secure/Signup!default.jspa">Sign up here.</a>
Then you must be added as member to our <code class="prettyprint">io.vitess</code> namespace.
Therefore, file a JIRA ticket with Sonatype to get added (<a href="https://issues.sonatype.org/browse/OSSRH-30604">example for a different namespace</a>).</p>

<h3 id="one-time-setup">One-time setup</h3>

<p><strong>Set up GPG</strong></p>

<p>Follow <a href="http://central.sonatype.org/pages/working-with-pgp-signatures.html">Sonatype&#39;s GPG instructions</a>.</p>

<p>Install <code class="prettyprint">gpg-agent</code> (needed below) e.g. on Ubuntu via: <code class="prettyprint">sudo apt-get install gnupg-agent</code></p>

<p><strong>Login configuration</strong></p>

<p>Create the <code class="prettyprint">settings.xml</code> in the <code class="prettyprint">$HOME/.m2/</code> directory as described in their <a href="http://central.sonatype.org/pages/apache-maven.html">instructions</a>.</p>

<h3 id="deploy-amp-release">Deploy &amp; Release</h3>

<ol>
<li><p>Make sure you are in the release branch.</p></li>
<li><p>Change the version number in all <code class="prettyprint">pom.xml</code> files with the &quot;versions&quot; plugin:</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c"># The Java version must not have the leading &quot;v&quot;.</span>
<span class="c"># Example: 2.1.0 and not v2.1.0.</span>
<span class="c"># Use Bash substitution to remove the leading &quot;v&quot;.</span>
<span class="nv">JAVA_VERSION</span><span class="o">=</span><span class="k">${</span><span class="nv">PATCH</span><span class="p">/v/</span><span class="k">}</span>
<span class="nb">cd </span>java
mvn versions:set -DnewVersion<span class="o">=</span><span class="nv">$JAVA_VERSION</span>
</code></pre></div></li>
<li><p>Run <code class="prettyprint">git diff java/</code> to double check that the version was updated correctly.</p></li>
<li><p>Create a Git commit with the version change while you are in the <strong>release</strong> branch (not master). You will push it later.</p></li>
<li><p>Run <code class="prettyprint">gpg-agent</code> to avoid that Maven will constantly prompt you for the password of your private key.</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nb">eval</span> <span class="k">$(</span>gpg-agent --daemon --no-grab --write-env-file <span class="nv">$HOME</span>/.gpg-agent-info<span class="k">)</span>
<span class="nb">export </span><span class="nv">GPG_TTY</span><span class="o">=</span><span class="k">$(</span>tty<span class="k">)</span>
<span class="nb">export </span>GPG_AGENT_INFO
</code></pre></div></li>
<li><p>Deploy (upload) the Java code to the oss.sonatype.org repository:</p>

<p class="warning"><b>Warning:</b> After the deployment, the Java packages will be automatically released. Once released, you cannot delete them. The only option is to upload a newer version (e.g. increment the patch level).</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash">mvn clean deploy -P release
<span class="nb">cd</span> ..
</code></pre></div></li>
</ol>

<p>At the end of the release, you will also have to bump the SNAPSHOT version in the master branch (see <a href="#bump-java-snapshot-version">below</a>).</p>

<h2 id="push-the-release-branch-and-tag-to-upstream">Push the release branch and tag to upstream</h2>

<p>Note that we&#39;re pushing to upstream (youtube/vitess), not origin (your fork).</p>

<p class="warning"><b>Warning:</b> After the following push, there's no going
back, since tags don't get updated if someone else has fetched them already.
If you need to re-tag after this point, you MUST increment the version number.
</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c"># release branch</span>
git push upstream release-X.Y
<span class="c"># release tag</span>
git push upstream vX.Y.Z
</code></pre></div>
<h2 id="add-release-notes-and-send-announcement">Add release notes and send announcement</h2>

<p><a href="https://github.com/youtube/vitess/tags">Find your new tag</a> and add release
notes. Use the GitHub <a href="https://github.com/youtube/vitess/compare">Compare</a> tool
to see all the commits since the last release.</p>

<p>Then send an announcement on the <a href="https://groups.google.com/forum/#!forum/vitess-announce">vitess-announce</a> list.</p>

<h2 id="bump-java-snapshot-version">Bump Java SNAPSHOT version</h2>

<p>The Java version in the <strong>master</strong> branch has the suffix <code class="prettyprint">-SNAPSHOT</code> and should always reference the <strong>next</strong> release number.
For example, if you just released <code class="prettyprint">2.1.0</code>, you could bump it to <code class="prettyprint">2.1.1-SNAPSHOT</code>.</p>

<p>Change the SNAPSHOT version as follows:</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash">git checkout master
git pull --ff-only upstream master

<span class="c"># Example:</span>
<span class="c"># (Note that there is no leading &quot;v&quot;.)</span>
<span class="nv">JAVA_VERSION</span><span class="o">=</span>2.1.1-SNAPSHOT
<span class="nb">cd </span>java
mvn versions:set -DnewVersion<span class="o">=</span><span class="nv">$JAVA_VERSION</span>

<span class="c"># Verify diff.</span>
git diff

git commit -a -m <span class="s2">&quot;java: Bump SNAPSHOT version to $JAVA_VERSION after Vitess release $PATCH.&quot;</span>

git push upstream master
</code></pre></div>
      </div>
    </div>
  </div>

</div>

    <div class="page-spacer"></div>
    <footer role="contentinfo" id="site-footer">
  <nav role="navigation" class="menu bottom-menu">
    
    <a href="https://groups.google.com/forum/#!forum/vitess" target="_blank">Contact: vitess@googlegroups.com</a>&nbsp;&nbsp;<b>·</b>&nbsp;&nbsp;
    <a href="https://groups.google.com/forum/#!forum/vitess-announce" target="_blank">Announcements</a>&nbsp;&nbsp;<b>·</b>&nbsp;&nbsp;
    &#169; 2017 <a href="/">Vitess</a> powered by <a href="https://developers.google.com/open-source/">Google Inc</a>
  </nav>
</footer>


        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!--    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>   -->
    <!-- Include all compiled plugins (below), or include individual files as needed -->
<!--
    <script src="/libs/bootstrap/js/bootstrap.min.js"></script>
-->
    <!-- Include the common site javascript -->
    <script src="/js/common.js" type="text/javascript" charset="utf-8"></script>


  </body>
</html>
